function goBack() {
    window.top.xhTop.getActiveFrame().obj.funObj().backToList();
}

function shield(id,name) {
    window.top.xhTop.showModal({
        title: '禁言 '+name,
        content: '<iframe  src="'+baseUrl+'feedback/shieldForm?needReload=false&id='+id+'"  style="width: 100%;;border-style: none;padding: 0px;height:200px"  scrolling="yes"   ></iframe>',
        width:900,
        button:'确定',
        backClose:false
    });
}

function reply(id,name) {
    var desc = $('#describle').text();
    window.top.xhTop.showModal({
        title: '回复 '+name,
        content: '<iframe  src="'+baseUrl+'feedback/replyForm?needReload=false&id='+id+'&describe='+desc+'"  style="width: 100%;;border-style: none;padding: 0px;height:300px"  scrolling="yes"   ></iframe>',
        width:900,
        button:'确定',
        backClose:false
    });
}


function del(id) {
    xhExtra.askChangeStatus('feedback/deleteFeedBack',{ids:id},null,'删除后，客户端也会同步删除',function (res) {
        window.top.xhTop.showSuccess(res.msg);
        parent.location.reload();
    })
}

function getHeight() {
    var height = $(window).height();
    height -= 100;
    $('.scrollDiv').eq(0).attr('style','height:'+height+'px;')
}


$(function () {
    var idObj = window.top.xhTop.getActiveFrame().obj.funObj().getNextFrontId();
    var id = xhTool.getQuery('id');
    var obj = idObj[id];
    $('.images').viewer();
    if (obj['front']) {
        $('#front').attr('href',baseUrl+'feedback/feedbackDetail?id='+obj['front']);
    } else {
        $('#front').unbind('click').bind('click',function () {
            window.top.xhTop.showError('提示','已至本页第一条');
        });
    }
    if (obj['next']) {
        $('#next').attr('href',baseUrl+'feedback/feedbackDetail?id='+obj['next']);
    } else {
        $('#next').unbind('click').bind('click',function () {
            window.top.xhTop.showError('提示','已至本页最后一条');
        });
    }
    getHeight();
});